/**
 * Created by graysoft on 2017/2/22.
 */
import React,{Component} from "react";
import Header from "./header.react";
import Footer from "./footer.react";
import Aside from "./aside.react"
import Content from "./content.react";
import $ from "jquery";

export default class Application extends Component{
    constructor(props){
        super(props)
    }

    componentDidMount(){
        $("#collapse").click(function(){
            var isOpened = $(this).hasClass("opened");

            $("#favor,#collapse,#content").removeClass();
            $("#favor,#collapse,#content").toggleClass(function() {
                if (isOpened) {
                    return "closed";
                } else {
                    return "opened";
                }
            });

        })
    }

    render(){
        return (
            <article id="neutrey">
                <Header/>
                <section id="main">
                    <Aside />
                    <Content />
                </section>
                <Footer/>
            </article>
        )
    }
}